#ifndef UTIL_H_
#define UTIL_H_

#define NEW( o ) malloc( sizeof( o ) );
//#define NEW_ARRAY( a, c ) (a)calloc( ( c ), sizeof( a ) );
#define NEW_ARRAY( a, c ) malloc( sizeof( a ) * ( c ) );
//#define NEW_ARRAY( a, c ) ( (void*)0 );

#define SAFE_DELETE( a ) if( a ) { free( a ); a = NULL; }

#define S_ERROR( type, msg ) fprintf( stderr, "%s: [%s:%d] %s\n", type, __FILE__, __LINE__, msg );
#endif /*UTIL_H_*/
